/*!\ file Battleship.h
 * \ author CT Ortman / Matthew Richard
 * \ Latest Update: 4/15/13
 * \ This class contains an instance of a game of Battleship for a single player
 */

#ifndef BATTLESHIP_H
#define BATTLESHIP_H

// #define AirCarrier = 5;
// #define Battleship = 4;
// #define Submarine = 3;
// #define Destroyer = 2;
// #define TugBoat = 1;

class Battleship
{
  public:
   Battleship (bool p1); //Constructor, requires a bool to identify whether the player controlling this instance is Player 1
   void updateBoard(int*** grid); // Updates the board of this instance from a board passed to the class
   void getPlacement(int*** grid); // Updates the section of the board not controlled by the player who owns this instance of the game
   int *** giveBoard();  // Returns the board from the class
   int *** takeTurn();  //  Takes a single turn, allowing the player owning this class to attack a space on the board owned by the opposing player
						//    and returns the new resulting board.
   bool winCondition(); // Checks to see whether the owner of this instance has won the game or not
   void printBoard();  // Prints the current board

  private:
   void placeShips();  // private function called when the class is initiated to place the ship positions
   int *** board;      // 3 dimensional array containing the game board
   int  shipSize [5];  // Array containing the lengths of each of the games 5 seperate ships
   bool player1;       // Bool identifying whether the owner of this instance is Player 1 or not
};

#include "Battleship.hpp"
#endif
